home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / propmgr1.arc / EDIT.BLD < prev    next >
Encoding:
Text File  |  1979-12-31  |  4.4 KB  |  165 lines

  1. * DATE 07/20/84  17:58
  2. * edit.cmd
  3. * this program will edit the current record
  4. STOR CHR(PEEK (063)) TO dr
  5. * if deleted it cant be edited so
  6. RECA
  7. * store field variables into mem variables for editing
  8. STOR baddr TO mbaddr
  9. STOR bcode TO mbcode
  10. STOR $(bcity,1,20) TO mbcity
  11. STOR $(bcity,21,2) TO mbst
  12. STOR $(bcity,23,5) TO mbzip
  13. STOR $(bdata,1,25) TO mbmgr
  14. STOR $(bdata,26,13) TO mbphone
  15. STOR $(bdata,39,2) TO mbtype
  16. STOR $(bdata,41,3) TO mbunit
  17. STOR $(bdata,44,8) TO mbacq
  18. STOR bprice TO mbprice
  19. STOR remit TO mremit
  20. STOR phone TO mphone
  21. STOR remitad TO mremitad
  22. STOR remitc TO mremitc
  23. STOR checks TO mchecks
  24. STOR bnotes TO mbnotes
  25. STOR bupdate TO mbupdate
  26. * set up screen and prompt for editing
  27. ERAS
  28. STOR 'Edit Building Data' TO mode
  29. STOR 'Enter the new or corrected information' TO prompt1
  30. STOR "Control 'Q' to end edit session" TO prompt2
  31. @ 0,26 SAY mode
  32. @ 1, 0 SAY " -------------------------------------------------"
  33. @ 1,50 SAY "-----------------------------"
  34. @ 3, 1 SAY "Address:"
  35. @ 3,55 SAY "Code:"
  36. @ 4, 4 SAY "City:"
  37. @ 4,37 SAY "State:"
  38. @ 4,56 SAY "Zip:"
  39. @ 6, 1 SAY "Manager:"
  40. @ 6,54 SAY "Phone:"
  41. @ 7, 4 SAY "Type:"
  42. @ 7,44 SAY "Number of Units:"
  43. @ 9, 0 SAY "Acquired:"
  44. @ 9,45 SAY "Purchase Price:"
  45. @ 11,28 SAY "Send Rental Payments To:"
  46. @ 12,00 SAY "Company:"
  47. @ 12,54 SAY "Phone:"
  48. @ 13,01 SAY "Street:"
  49. @ 14,03 SAY "City:"
  50. @ 15,00 SAY "Chks To:"
  51. @ 17,02 SAY "Notes:"
  52. @ 18,52 SAY "Updated:"
  53. @ 19, 0 SAY " -------------------------------------------------"
  54. @ 19,50 SAY "-----------------------------"
  55. @ 20, 4 SAY prompt1
  56. @ 21, 4 SAY prompt2
  57. @ 3,10 GET mbaddr
  58. @ 3,61 GET mbcode PICTURE '99'
  59. @ 4,10 GET mbcity
  60. @ 4,44 GET mbst PICTURE '!!'
  61. @ 4,61 GET mbzip PICTURE '99999'
  62. @ 6,10 GET mbmgr
  63. @ 6,61 GET mbphone PICTURE '(999)999-9999'
  64. @ 7,10 GET mbtype
  65. @ 7,61 GET mbunit
  66. @ 9,10 GET mbacq PICTURE '99/99/99'
  67. @ 9,61 GET mbprice
  68. @ 12,10 GET mremit
  69. @ 12,61 GET mphone
  70. @ 13,10 GET mremitad
  71. @ 14,10 GET mremitc
  72. @ 15,10 GET mchecks
  73. @ 17,10 GET mbnotes
  74. @ 18,61 GET mbupdate PICTURE '99/99/99'
  75. READ
  76. CLEA GETS
  77. * test if there is a bad field validation
  78. DO CASE
  79. CASE mbcode = ' '
  80. * no building code
  81.  STOR t TO error
  82. OTHE
  83.  STOR f TO error
  84. ENDC
  85. * if test for error was true then fix the fields that need fixing
  86. IF error
  87. * erase the lines to be used for prompts
  88.  @ 00,00
  89.  @ 20,00
  90.  @ 21,00
  91. * tell them to correct it
  92.  @ 0,18 SAY 'Please Correct the Indicated Data'
  93. * keep looping until all fields are fixed
  94.  STOR t to an:error
  95.  DO WHIL an:error
  96.   DO CASE
  97.   CASE mbcode = ' '
  98.    @ 20,15 SAY 'Must have a building code                              '
  99.    @ 03,61 GET mbcode PICTURE '99'
  100.    READ
  101.   OTHE
  102.    STOR f TO an:error
  103.   ENDC
  104.  ENDD while an:error
  105. ENDI error
  106. STOR 'N' TO command
  107. @ 20,00
  108. @ 21,00
  109. @ 20,15 SAY 'Are there any more changes ?                        '
  110. @ 20,48 GET command picture '!'
  111. READ
  112. IF command = 'Y'
  113.  @ 0,00
  114.  @ 3,10 GET mbaddr
  115.  @ 3,61 GET mbcode PICTURE '99'
  116.  @ 4,10 GET mbcity
  117.  @ 4,44 GET mbst PICTURE '!!'
  118.  @ 4,61 GET mbzip PICTURE '99999'
  119.  @ 6,10 GET mbmgr
  120.  @ 6,61 GET mbphone PICTURE '(999)999-9999'
  121.  @ 7,10 GET mbtype
  122.  @ 7,61 GET mbunit
  123.  @ 9,10 GET mbacq PICTURE '99/99/99'
  124.  @ 9,61 GET mbprice
  125.  @ 12,10 GET mremit
  126.  @ 12,61 GET mphone
  127.  @ 13,10 GET mremitad
  128.  @ 14,10 GET mremitc
  129.  @ 15,10 GET mchecks
  130.  @ 17,10 GET mbnotes
  131.  @ 18,61 GET mbupdate PICTURE '99/99/99'
  132.  @ 20,00
  133.  @ 21,00
  134.  @ 20,04 SAY prompt1
  135.  @ 21,04 SAY prompt2
  136. * let user enter data
  137.  READ
  138.  CLEA GETS
  139. ENDI command = 'Y'
  140. REPL baddr WITH mbaddr, bcode WITH mbcode
  141. REPL bcity WITH mbcity + mbst + mbzip
  142. REPL bdata WITH mbmgr + mbphone + mbtype + mbunit + mbacq
  143. REPL bprice WITH mbprice, remit WITH mremit, phone WITH mphone
  144. REPL remitad WITH mremitad, remitc WITH mremitc,checks WITH mchecks, bnotes WITH mbnotes
  145. * ask if an automatic update of the date is wanted
  146. IF $(DATE(),1,2) <> '00'
  147.  STOR 'Y' TO command
  148.  @ 20,00
  149.  @ 21,00
  150.  @ 20,12 SAY 'Do You wish to UpDate to Todays Date (Y/N) ?'
  151.  @ 20,57 GET command PICTURE '!'
  152.  READ
  153.  IF command = 'Y'
  154.   REPL bupdate WITH  DATE()
  155.  ELSE
  156.   REPL bupdate WITH mbupdate
  157.  ENDI $(date)
  158. ENDI command = 'Y'
  159. RELE ALL
  160. * restore original memory
  161. STOR '?' TO command
  162. STOR t TO more
  163. STOR t TO first
  164. RETU
  165.